<div class="sf_admin_list">
    <?php if (!$pager->getNbResults()): ?>
        <p><?php echo __('No result', array(), 'sf_admin') ?></p>
    <?php else: ?>
        <div class="cajatablausuariobus">  
            <table border="4" cellspacing="0" align="center">
                <thead id="cabtabla">
                    <tr>
                        <th id="sf_admin_list_batch_actions"><input id="sf_admin_list_batch_checkbox" type="checkbox" onclick="checkAll();" /></th>
                        <?php include_partial('usuarios/list_th_tabular', array('sort' => $sort)) ?>
                        <th id="sf_admin_list_th_actions"><?php echo __('Actions', array(), 'sf_admin') ?></th>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <th colspan="15">
                            <?php if ($pager->haveToPaginate()): ?>
                                <?php include_partial('usuarios/pagination', array('pager' => $pager)) ?>
                            <?php endif; ?>

                            <?php echo format_number_choice('[0] sin resultados|[1] 1 resultado|(1,+Inf] %1% resultados', array('%1%' => $pager->getNbResults()-1), $pager->getNbResults()-1, 'sf_admin') ?>
                            <?php if ($pager->haveToPaginate()): ?>
                                <?php echo __('(page %%page%%/%%nb_pages%%)', array('%%page%%' => $pager->getPage(), '%%nb_pages%%' => $pager->getLastPage()), 'sf_admin') ?>
                            <?php endif; ?>
                        </th>
                    </tr>
                </tfoot>
                <tbody>
                    <?php foreach ($pager->getResults() as $i => $sfguarduser): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?>
                        <tr class="sf_admin_row <?php echo $odd ?>">
                            <?php if ($sfguarduser->getIsSuperAdmin() == 0): ?>  
                                <?php include_partial('usuarios/list_td_batch_actions', array('sfguarduser' => $sfguarduser, 'helper' => $helper)) ?>
                                <?php include_partial('usuarios/list_td_tabular', array('sfguarduser' => $sfguarduser)) ?>
                                <?php include_partial('usuarios/list_td_actions', array('sfguarduser' => $sfguarduser, 'helper' => $helper)) ?>
                            <?php endif; ?>     
                        </tr>
                    <?php endforeach; ?>
                </tbody>
            </table>
        <?php endif; ?>
    </div>     
</div>
<script type="text/javascript">
    /* <![CDATA[ */
    function checkAll()
    {
        var boxes = document.getElementsByTagName('input'); for(var index = 0; index < boxes.length; index++) { box = boxes[index]; if (box.type == 'checkbox' && box.className == 'sf_admin_batch_checkbox') box.checked = document.getElementById('sf_admin_list_batch_checkbox').checked } return true;
    }
    /* ]]> */
</script>
